package com.eeds.common.enums;

import com.eeds.common.enums.base.BaseEnum;

/**
 * @author Flying
 * @Description
 * @date 18:48 2018-08-16
 **/
public enum GearPositionEnum implements BaseEnum {
    /**
     *
     */
    A(1,"A",1.2D),
    /**
     *
     */
    B(2,"B",1D),
    /**
     *
     */
    C(3,"C",0.8D);

    private final Integer value;

    private final String description;

    private final Double source;

    GearPositionEnum(Integer value, String description,Double source){
        this.value = value;
        this.description = description;
        this.source = source;
    }

    public static GearPositionEnum valueOf(Integer value) {
        for (GearPositionEnum item : values()) {
            if (item.getValue().equals(value)) {
                return item;
            }
        }
        return null;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    @Override
    public String getDescription() {
        return description;
    }

    public Double getSource() {
        return source;
    }

    public GearPositionEnum get(Integer value) {
        return GearPositionEnum.valueOf(value);
    }


    @Override
    public String toString() {
        return String.valueOf(this.value);
    }
}
